package poo.comparatori;

import java.util.Comparator;

public class MioComparatore implements Comparator<String> {

	@Override
	public int compare(String x, String y) {
		if (x.length() < y.length() || x.length() == y.length()
				&& x.compareTo(y) < 0)
			return -1;
		if (x.equals(y))
			return 0;
		return 1;
	}

}
